<%@ page language="java"  pageEncoding="UTF-8" import="com.yb.util.comm.RequestUtil,com.yb.domain.member.TsSysuser,com.yb.util.comm.Contants" contentType="text/html; charset=utf-8"%>
<%@page import="com.yb.util.framework.UserList"%>
<%@taglib prefix="s" uri="/struts-tags"%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>头部</title>
<link href="<%=basePath %>resource/css/css.css" rel="stylesheet" type="text/css" />
<link rel="Shortcut Icon" type="image/x-icon" href="<%=basePath%>resource/img/favicon.ico" media="screen" />
    <script type="text/javascript" src="<%=basePath%>resource/js/jquery-1.4.2.js"></script>
</head>

<body id="top">

<div id="top-1">
  
    <div class="top-1-left"><a href="javascript:addfavorite()"  title="收藏本站">收藏本站</a></div>
    <%
      TsSysuser  tsSysuser = (TsSysuser) RequestUtil.getLoginUserFromSession(request, Contants.SESSION_USER);
      if(tsSysuser==null){
      %>
         <div class="top-1-right">欢迎登录幸福兄弟拼购网！ | <a href="<%=basePath %>login.html" target="_top" title="登录">登录</a> | <a href="<%=basePath %>user/goForWordRegister.shtml" target="_top" title="免费注册">免费注册</a> |&nbsp;&nbsp; </div>	  
    <%   
      }
      else{
    %>
         <div class="top-1-right">欢迎<%=tsSysuser.getUsername() %>登录幸福兄弟拼购网！ | <a href="<%=basePath %>loginsuccess.jsp" target="_top"  title="个人管理">个人管理</a> | <a href="<%=basePath %>user/qiantanExit.shtml" target="_top"  title="退出登录">退出登录</a> </div>	  
    <%} %>
  </div>
  <div id="top-2">
  <table width="1000" border="0" cellspacing="0" cellpadding="0">
  <tr >
  <td>
    <table  border="0" cellspacing="0" cellpadding="0">
    <tr >
      <td width="79px" height="88">
      <div class="top-2-1"></div></td>
    <td width="10px">&nbsp;</td>
    <td width="157px" style="background:url(<%=basePath %>resource/img/index/logo4.jpg) no-repeat right "> 
</td>
     <td width="200px" style="background:url(<%=basePath %>resource/img/index/logo5.jpg) no-repeat left;" >
     <div style="padding-top:61px;height:25px;z-index:10" id="flexDiv">
     <object style="z-index:10" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="214" height="25">
        <param name="movie" value="<%=basePath %>resource/img/index/dh.swf"/>
        <param name="quality" value="high"/>
        <embed src="<%=basePath %>resource/img/index/dh.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="214" height="25">
        </embed>
        </object>
      </div>
    </td>
    </tr>
    <tr >
       <td colspan="4" style="background:url(<%=basePath %>resource/img/index/logo3.jpg) no-repeat left" align="left"><div class="top-2-2"><span style="color:#003366">拼购：</span>全城千万消费者聚在一起，哪个品牌商家敢不给我们最大的折扣？<br />
      <span style="color:#003366">拼购：</span>看得见的省钱，绝对让你省最多的钱！<br />
      <span style="color:#003366">拼购：</span>买最满意的产品！享受最称心的服务！<br />
      <span style="color:#003366">曝光维权：</span>商家如不讲诚信！<span style="color:#F00; font-weight:600; font-size:14px">800</span>万盐城人民助你讨回公道！</div></td>
    </tr>
    </table>
  </td>
  <td width="520px">
       <div id="indeximg" style="width:530px;height:170px">
      </div>
  </td>
  </tr>
  
</table>
<%
       String cssid= request.getParameter("cssid");

%>
</div>
  <div id="menut">
  <table width="1000" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td style="background:url(<%=basePath %>resource/img/index/menu-1.jpg) no-repeat" width="5" height="52"></td>
    <td style="background:url(<%=basePath %>resource/img/index/menu-2.jpg) repeat-x" width="991">
      <div id="menu-left">
        <ul>
          <li  <%
                      if(cssid == null || "1".equals(cssid)){
          
              %> class="selected" <%} %>><a href="<%=basePath %>home.shtml?cssid=1" target="_top"  ><span class="menu-left1 
            <%
                      if(cssid == null || "1".equals(cssid)){
          
              %>  selected2 <%} %> ">首 页</span></a></li>
          <li  <%
                      if("2".equals(cssid)){
          
              %> class="selected" <%} %>><a href="<%=basePath %>tribune/tribune_julebuPage.shtml?cssid=2" target="_top"><span class="menu-left1 
            <%
                      if("2".equals(cssid)){
          
              %>  selected2 <%} %>">拼客俱乐部</span></a></li>
          <li
             <%
                      if("3".equals(cssid)){
          
              %> class="selected" <%} %>
          ><a href="<%=basePath %>pggonglue/searchPingGouAndBrand.shtml?cssid=3" target="_top"><span class="menu-left1 
            <%
                      if("3".equals(cssid)){
          
              %>  selected2 <%} %>">拼购攻略</span></a></li>
          <li <%
                      if("4".equals(cssid)){
          
              %> class="selected" <%} %>><a href="<%=basePath %>/pingjia/findAllMesage.shtml?cssid=4" target="_top"><span class="menu-left1 
                 <%
                      if("4".equals(cssid)){
          
              %>  selected2 <%} %>
              ">曝光维权</span></a></li>
          <li <%
                      if("5".equals(cssid)){
          
              %> class="selected" <%} %>><a href="<%=basePath %>index/calculator.jsp?cssid=5" target="_top"><span class="menu-left1 
                 <%
                      if("5".equals(cssid)){
          
              %>  selected2 <%} %>">材料计算器</span></a></li>
        </ul>
      </div>
      <div id="menu-right">
        <div class="sou-1">
          <div class="suo-left-1">
            <label for="select"></label>
            <select style="border:0px;" name="select" id="searchType">
              <option value="-1">请选择</option>
              <option value="1">拼购品牌</option>
              <option value="2">抢购产品</option>
            </select>
          </div>
          <div class="suo-left-2">
            <label for="textfield"></label>
            <input name="textfield" type="text" id="keywordField" style="border:0px; line-height:20px; height:20px; width:185px; float:left" onkeydown="if(event.keyCode == 13) find();" />
          </div>
        </div>
        <div class="sou-2"><a  href="javascript:find()">搜索</a></div>
      </div>
      
    </td>
    <td style="background:url(<%=basePath %>resource/img/index/menu-3.jpg) no-repeat" width="4" height="52"></td>
  </tr>
</table>
  </div>
<script>
   var base="<%=basePath %>";
function addfavorite()
{
    window.external.addFavorite('http://www.9898sj.com','幸福兄弟')  ;
} 
  function  find(){
        
        var sv= document.getElementById("searchType");
         var name= document.getElementById("keywordField");
        if("-1"==sv.value)
        { 
          alert("请选择搜索类型");
          sv.focus();
          return;
        }
        if(""==name.value)
        { 
          alert("请输入搜索关键词");
          name.focus();
          return;
        }
        try{
			if(parent.window.location.href != window.location.href){
				parent.window.location.href=base+"search.shtml?name="+encodeURIComponent(name.value)+"&type="+sv.value;
			}else{
				window.location.href=base+"search.shtml?name="+encodeURIComponent(name.value)+"&type="+sv.value;
			}
		}catch(e){
			window.location.href=base+"search.shtml?name="+encodeURIComponent(name.value)+"&type="+sv.value;
		}
        
        
    }
$.get(base+'indexImg.shtml',function(mes){
			var json = eval('('+mes+')');
			var str = '<a target="_blank" href="'+base+'information/information_searchPingGouAndBrand.shtml?id='+json[0]['id']+'"><img src="'+base+json[0]['imgUrl']+'" style="width:530px;height:170px"/>';
			$('#indeximg').html(str);
		})

</script>
</body>
</html>
